export const columns = [
  {
    label: '菜单ID',
    prop: 'id',
    align: 'center',
    width: '80px',
  },
  {
    label: '菜单名称',
    prop: 'name',
    align: 'center',
  },
  {
    label: '路由路径',
    prop: 'path',
    align: 'center',
    slot: true,
    slotTag: 'path',
  },
  {
    label: '是否显示在侧边栏',
    prop: 'isSidebar',
    align: 'center',
    slot: true,
    slotTag: 'isSidebar',
  },
  {
    label: '父级菜单ID',
    prop: 'pid',
    align: 'center',
    slot: true,
    slotTag: 'pid',
  },
  {
    label: '创建时间',
    prop: 'createdAt',
    align: 'center',
  },
  {
    label: '操作',
    align: 'center',
    slot: true,
    slotTag: 'action',
  },
]

export const rules = {
  name: [{ required: true, message: '请输入菜单名称', trigger: 'blur' }],
  path: [{ required: true, message: '请输入路由路径', trigger: 'blur' }],
  component: [{ required: true, message: '请输入文件路径', trigger: 'blur' }],
  permission: [{ required: true, message: '请配置菜单权限', trigger: 'blur' }],
}
